<script language="javascript">
var delurl="<?php echo $deleteurl; ?>";
</script>
<script language="javascript">
var editurl="<?php echo $editurl; ?>";
</script>
<script language="javascript">
var addurl="<?php echo $addurl; ?>";
</script>
<script language="javascript">
var data=<?php echo $data; ?>;
</script>
<script language="javascript">
var disbutton=<?php echo $javascript->object($disbutton);?>;
</script>
<script language="javascript">
var title2="<?php echo $title2; ?>";
</script>
<?php echo $javascript->link('jquery-1.4.2');?>
<script language="javascript">
function button(com,grid,url)  
{  
	var ids=$("#flex").getCheckedRows();
	if(com=="delete")
	{
		var pids="";
		if(ids.length==0)
		{
			alert("请选择你要删除的项");
			return;
		}
		for(i=0;i<ids.length;i++)
        {
        	pids=pids+ids[i]+"/";
        }

		$.ajax({
            type: "post",
            url: url,
            data: {id:pids},
            dataType:"json",
            success: function(data) {
            $(".clearckeck").trigger("click");
			$(".pReload").trigger("click");
			$(".notice").html(data.message); 
			},
            error: function(data) {
				$(".clearckeck").trigger("click");
				$(".pReload").trigger("click");
				$(".notice").html('data.message');
			}
        });
	}
	else if(com=="add")
	{
		window.open(url,'mainFrame2');
	}
	else if(com=="edit")
	{
		if(ids.length!=1)
		{
			alert("请选择一个选项");
		}
		else
		{
			var seid=ids[0];
			var eurl=url+"?id="+seid;
			window.open(eurl,'mainFrame2');
		}
	}
	else
	{
		var pix=com.substring(0,2);
		switch (pix)
		{
			case "aj":
				var pids="";
				if(ids.length==0&&com.substring(0,3)!="ajj")
				{
					alert("请选择选项");
					return;
				}
				for(i=0;i<ids.length;i++)
		        {
		        	pids=pids+ids[i]+"/";
		        }
				$.ajax({
		           type: "post",
		           url: url,
		            data: {id:pids},
		            dataType:"json",
		            success: function(data) {
					$(".pReload").trigger("click");
					$(".notice").html(data.message); 
					},
		            error: function(data) {
						$(".clearckeck").trigger("click");
						$(".pReload").trigger("click");
						$(".notice").html('data.message');
					}
		        });
				break;
			case "up":
				if(ids.length!=1)
				{
					alert("请选择一个选项");
				}
				else
				{
					var seid=ids[0];
					var eurl=url+"?id="+seid;
					window.open(eurl,'mainFrame2');
				}
				break;
			case "op":
				if(ids.length<1)
				{
					alert("请选择一个选项");
				}
				else
				{
					var pids="";
					for(i=0;i<ids.length;i++)
			        {
			        	pids=pids+ids[i]+"-";
			        	
			        }
					var eurl=url+"?ids="+pids;
					window.open(eurl,'mainFrame2');
				}
				break;
			default:
				window.open(url,'mainFrame2');
		}
	}
}
</script>
<script type="text/javascript">
var b="";
/*[{
	name:'add',
	displayname : '添加',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/add.png',
	bclass : 'add',
	onpress : button,
	display:disbutton.add,
	url:addurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.del
},
{
	name:'delete',
	displayname : '删除',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/delete.png',
	bclass : 'delete',
	onpress : button,
	display:disbutton.del,
	url:delurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.del
},
{
	name:'edit',
	displayname : '更新',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/edit.png',
	bclass : 'add',
	onpress : button,
	display:disbutton.edit,
	url:editurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.edit
}];*/
</script>
<script type="text/javascript">
var ob=<?php echo $ob;?>;
if(ob.length==0)
{
	
}
else
{
	for(i=0;i<ob.length;i++)
	{
		var l=b.length;
		b[l]=ob[i];
	}
}
</script>

<?php
	echo $html->css('flexigrid');
	echo $html->css('start/jquery-ui-1.8.2.custom');
	echo $javascript->link('jquery-1.4.2');
	//echo $javascript->link('jquery');
	echo $javascript->link('flexigrid/flexigrid'); 
	echo $javascript->link('projectlistajax');
	//echo $javascript->link('DatePicker/WdatePicker');
	echo $javascript->link('jquery-ui-1.8.2.custom.min');
?>
<script type="text/javascript">
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );
	});
</script>
<div class="message" style="display:none;"></div>
<!-- 当前位置-->
<div id="flashMessage"></div>
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Customer Managements');//一级目录
										   echo '>';echo __('Customer Managements');//二级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Customer Managements Detail',true).'&nbsp;&nbsp;&nbsp;'.$thedetail['Companymanage']['name']);//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>

<!-- 当前位置-->
</div>
<table>
	<tr>
		<td width="50"></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/initDetail/<?php echo $projectid?>">基本信息</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/linkmanlist/<?php echo $projectid?>">联系人</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/projectlist/<?php echo $projectid?>" style="color:red">项目列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/initDetailRemark/<?php echo $projectid?>">备注信息</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/contactallinfo/<?php echo $projectid?>">联系日志</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/positionallinfo/<?php echo $projectid?>">职位列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/contractmanagementlist/<?php echo $projectid?>">合同管理</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/feemanageinit/<?php echo $projectid?>">费用统计</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/staffallinfo/<?php echo $projectid?>">企业员工</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/resumeReportAllinfo/<?php echo $projectid?>">简历报告</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/appendixUpload/<?php echo $projectid?>">附件列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/sameCompany/<?php echo $projectid?>">同行公司</a></td>
	</tr>
</table>

<!--                                          按钮区域-->
<script type="text/javascript">
$(function(){
		$("#bt_6").click(function () {
			//$(".bt6").click();
			button('add','',addurl);
		});
		$("#bt_7").click(function () {
			button('op2','','<?php echo ROOT_WEB_PATH;?>/outputexcels/excela')
			//$(".bt7").click();
		});
		});
</script>
<div class="buttonbg">
<a class="btn4" id="bt_6">添加项目</a>   <!-- 一个中文字12px宽 a的宽根据按钮内容设 -->
<a class="btn4" id="bt_7">进度报表</a>
</div>
<!--                                         按钮区域--> 
<?php echo $form->hidden('id',array('default'=>"$projectid",'id'=>'id'));?>   

<div class="tabflex">
<table id="flex" style="display: none"></table>
</div>



